package net.lzzy.chapter426;

import java.util.Comparator;

public class StudentCompartor implements Comparator<Student>,java.io.Serializable {
    @Override
    public int compare(Student o1, Student o2) {
        double score1 = o1.getScore();
        double score2 = o2.getScore();

        if (score1<score2)
            return -1;
        else if (score1==score2)
            return 0;
        else
            return 1;
    }
}
